/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * log.h
 * Copyright (C) Francesco Marcantoni 2006 <ramyel@gmail.com>
 * 
 * You may redistribute it and/or modify it under the terms of the
 * GNU General Public License, as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option)
 * any later version.
 * 
 * main.c is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with main.c.  If not, write to:
 * 	The Free Software Foundation, Inc.,
 * 	51 Franklin Street, Fifth Floor
 * 	Boston, MA  02110-1301, USA.
 */


// Log List
GList* tokyo_log_list;
#define TOKYO_LOG_LIST tokyo_log_list

typedef enum
{
	P_NORMAL, // Log visualizzato all'utente
	P_DEBUG, // Log visualizzato se e' attiva la flag di Debug
	P_ERROR, // Errore
	P_MAX
} LogPriority;

typedef struct
{
	gchar *log; // Contenuto del log
	gchar *function; // Funzione chiamante
	LogPriority priority; // Pririta' del log
} Log;

void tlog	(	LogPriority priority,
				gchar *function,
				gchar *str, ... );

void log_list_append	(	LogPriority priority,
							gchar *function,
							gchar *log );

void log_list_free (void);
